home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 3 / ct-rom iiib.zip / ct-rom iiib / WINDOWS / DIVERSEN / WINE02BX / C-COMMEN.ELC < prev    next >
Text File  |  1993-03-28  |  7KB  |  73 lines

  1. ;;; compiled by @win386 on Sat Mar 13 14:30:17 1993
  2. ;;; from file c:/src/lucid-19.4/lisp/modes/c-commen.el
  3. ;;; emacs version 19.3 Lucid.
  4. ;;; bytecomp version 2.08; 27-aug-92.
  5. ;;; optimization is on.
  6. ;;; this file uses opcodes which do not exist in Emacs18.
  7.  
  8. (if (and (boundp 'emacs-version)
  9.      (or (and (boundp 'epoch::version) epoch::version)
  10.          (string-lessp emacs-version "19")))
  11.     (error "This file was compiled for Emacs19."))
  12.  
  13. (provide 'c-comment-edit)
  14. (defvar c-comment-leader " *" "\
  15. *Leader used when rebuilding edited C comments.  The value of this variable
  16. should be a two-character string.  Values of " ", " * " and " ** " produce the\ncomment styles:\n    /*    /*    /*\n      ...     * ...    ** ...\n      ...     * ...    ** ...\n    */     */    */\nrespectively.")
  17. (defconst c-comment-leader-regexp "^[     ]*\\(\\*\\*\\|\\*\\)?[ ]?" "\
  18. Regexp used to match C comment leaders.")
  19. (defvar c-comment-edit-mode 'text-mode "\
  20. *Major mode used by `c-comment-edit' when editing C comments.")
  21. (defvar c-comment-edit-hook nil "\
  22. *Function to call whenever `c-comment-edit' is used.
  23. The function is called just before the `c-comment-edit' function allows you to
  24. begin editing the comment.")
  25. (defvar c-comment-edit-buffer-alist nil "\
  26. Assoc list of C buffers and their associated comment buffers.
  27. Elements are of the form (C-BUFFER COMMENT-BUFFER COMMENT-START COMMENT-END)
  28. COMMENT-START and COMMENT-END are markers in the C-BUFFER.")
  29. (fset 'save-point '(macro . #[(&rest body) "└┴┬├ B┼EEç" [let ((save-point (point))) unwind-protect progn body (goto-char (min (point-max) save-point))] 5 "\
  30. Save value of point, evalutes FORMS and restore value of point.
  31. If the saved value of point is no longer valid go to (point-max).
  32. The variable `save-point' is lambda-bound to the value of point for
  33. the duration of this call."]))
  34. (fset 'marker '(macro . #[(pos &optional buffer) "└┴\n Fç" [set-marker (make-marker) pos buffer] 4]))
  35. (fset 'c-comment-edit #[(search-prefix) "p└ëëëëë┴    \n╦ܽà╠ ê¬Ñ\n═ܽï╬ ê╧ ê╠ ê¬ö\n╨ܽà╤ ê¬ë\n╥ܽâebê\n¼Ö╙ ë½Æ╘ @└ô╘ A└ô¬Ü└ë╫╪┘Åê╘ └ô╘ └ô*è bêi)Z█▄ ▌P!p FB▀ α\\ αZ#ê\n¼Æ` W¼ì╘ ` ZαZß\\ôΓ!êebêm¼ôπ$└┴#½åσµ└┴#ê└yê¬j'«üΦ êebêΘΩ!½äδß!ê«üebê∞└!ê.-½ä- êε∩≡!!ç" [nil t inhibit-quit c-comment-end c-comment-start c-comment-buffer c-comment-fill-column tem marker c-buffer search-prefix (4) backward-paragraph (16) end-of-defun beginning-of-defun (64) backward-page (256) within-c-comment-p make-marker end start error-data (byte-code "`┴Ä┬├!ê`─Z┬╞!ê`*┬ç" [save-point ((byte-code "d^bç" [save-point] 2)) search-forward "/*" 2 start "*/" end] 2) ((search-failed (error "No C comment found."))) fill-column generate-new-buffer buffer-name " *C Comment Edit*" c-comment-edit-buffer-alist copy-to-buffer 2 1 switch-to-buffer re-search-forward c-comment-leader-regexp replace-match "" c-comment-edit-mode fundamental-mode looking-at "[ \n    ]" delete-char set-buffer-modified-p c-comment-edit-hook message substitute-command-keys "Type \\[c-comment-edit-end] to end edit, \\[c-comment-edit-abort] to abort with no change."] 8 "\
  36. Edit multi-line C comments.
  37. This command allows the easy editing of a multi-line C comment like this:
  38.    /*
  39.     * ...
  40.     * ...
  41.     */
  42. The comment may be indented or flush with the left margin.
  43.  
  44. If point is within a comment, that comment is used.  Otherwise the
  45. comment to be edited is found by searching forward from point.
  46.  
  47. With one \\[universal-argument] searching starts after moving back one
  48.   paragraph.
  49. With two \\[universal-argument]'s searching starts at the beginning of the
  50.   current or proceeding C function.
  51. With three \\[universal-argument]'s searching starts at the beginning of the
  52.   current page.
  53. With four \\[universal-argument]'s searching starts at the beginning of the
  54.   current buffer (clipping restrictions apply).
  55.  
  56. Once located, the comment is copied into a temporary buffer, the comment
  57. leaders and delimiters are stripped away and the resulting buffer is
  58. selected for editing.  The major mode of this buffer is controlled by
  59. the variable `c-comment-edit-mode'.
  60.  
  61. Use \\[c-comment-edit-end] when you have finished editing the comment.  The
  62. comment will be inserted into the original buffer with the appropriate
  63. delimiters and indention, replacing the old version of the comment.  If
  64. you don't want your edited version of the comment to replace the
  65. original, use \\[c-comment-edit-abort]." "*P"])
  66. (fset 'c-comment-edit-end #[nil "└ ë¼ä┬├!ê─    @    A@┼    8╞    8    \n ╠ â┤ebê═cê╧ÿ½æm¼ól¼å╨▒ê╤yê¬om¼æl½â╥¬ü╨▒ê╤yê¬l╙h╘\"¼â╒cê╓ÿ½â╫¬ü╪cêè\nqêbêi)ebê┌U¼Å╤yêm¼ëjê╤yê¬t)è\nqê`▄Äè|êbê    qê▌\ned#ê,¬ä▐▀!êα\n!½ëßα\n!!ê¬àΓ\n!êα    !½çπα    !!êΣ    %\"%è    qêµ╤!êτ    !ê)╤ëôê╤ëô.ç" [find-c-comment-buffer tuple error "Not a c-comment-edit buffer." t 2 3 c-comment-end c-comment-start c-comment-buffer c-comment-c-buffer inhibit-quit buffer-modified-p "/*\n" c-comment-leader "  " " " nil "" char-equal 10 "\n" " *" " */" "*/" indention 0 save-point ((byte-code "d^bç" [save-point] 2)) append-to-buffer message "No change." get-buffer-window select-window switch-to-buffer delete-window delq c-comment-edit-buffer-alist set-buffer-modified-p kill-buffer] 7 "\
  67. End c-comment-edit.
  68. C comment is replaced by its edited counterpart in the appropriate C buffer.
  69. Indentation will be the same as the original." nil])
  70. (fset 'c-comment-edit-abort #[nil "└ ë@    A@─    8╞    8    ¼ä╚╔!ê╩\n!½ê╦╩\n!!ê¬ä╠\n!ê═è qê╧╨!ê╤ !ê)╥    \"╨ëôê╨ëôê╘╒!.ç" [find-c-comment-buffer tuple c-comment-c-buffer c-comment-buffer 2 c-comment-start 3 c-comment-end error "Not a c-comment-edit buffer." get-buffer-window select-window switch-to-buffer t inhibit-quit set-buffer-modified-p nil kill-buffer delq c-comment-edit-buffer-alist message "Aborted with no change."] 4 "\
  71. Abort a c-comment-edit with no change." nil])
  72. (byte-code "└┴Mê┬├Mê─┼Mê╞╚╔#ê╞╩╦#ç" [within-c-comment-p #[nil "└┴┬Åç" [error-data (byte-code "└ë`─Ä┼╞!ê`╟╚!ê`*`    W¡â\n    B*ç" [nil end start save-point ((byte-code "d^bç" [save-point] 2)) search-backward "/*" search-forward "*/"] 2) ((search-failed))] 3] find-c-comment-buffer #[(&optional buffer) "¼ép    ├─ì)ç" [buffer c-comment-edit-buffer-alist list return-value (byte-code "¡ù@A@    =½ê┬├@\"ê¬mAë¼j─ç" [list buffer throw return-value nil] 4)] 2] find-c-comment-c-buffer #[(&optional buffer) "¼ép    ├─ì)ç" [buffer c-comment-edit-buffer-alist list return-value (byte-code "¡û@@    =½ê┬├@\"ê¬nAë¼k─ç" [list buffer throw return-value nil] 4)] 2] define-key mode-specific-map "" c-comment-edit-end "" c-comment-edit-abort] 4)
  73.